<?xml version="1.0" encoding="UTF-8"?>
<ui:composition
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
	template="/WEB-INF/templates/business/supplier/template.xhtml"
>

	<f:metadata>
		<f:viewParam name="firstResult" value="#{notificationList.firstResult}"></f:viewParam>
		<f:viewParam name="title" value="#{notificationList.parameterValues['title']}"></f:viewParam>
	</f:metadata>
	<ui:define name="supplier_head">
		<style type="text/css">
			.table{
				width: 100%;
				border: 1px solid #e7e7e7;
				border-collapse: collapse;
				border-spacing: 0;
				table-layout: fixed;
			}
		</style>
	</ui:define>
	<ui:define name="supplier_content">

		<h:form id="searchForm">
			
			<!--右侧我收到的项目邀请-->
			<div class="iethbox_tit">
				<h2>消息通知</h2>
				<ui:remove>
					<span>
						<p:link outcome="/index.xhtml" value="平台首页"></p:link>					
						&gt;消息通知
					</span>
				</ui:remove>
			</div>
			<div class="iethbox_area">				
				<p:outputLabel value="标题："></p:outputLabel>				
				<p:inputText value="#{notificationList.parameterValues['title']}"></p:inputText>
				
				<div class="actionButtons">
					<p:commandButton value="查询" ajax="false"   action="NotificationList.xhtml?faces-redirect=true&amp;includeViewParams=true&amp;firstResult=0" styleClass="blue-int"></p:commandButton>
					<p:button value="重置" outcome="NotificationList.xhtml"></p:button>
				</div>				
				
				<div class="clearbt"></div>
			</div>

			<!--tab切换开始-->
			<!--采购公告、中选公告开始-->
			
			<div class="iethbox_table">
				<p:dataTable value="#{notificationList.resultList}" styleClass="table" var="_notification">
					<p:column styleClass="blue_c">
						<f:facet name="header">标题</f:facet>
						<h:outputText value="#{_notification.titile}" style="font-weight: bold;" rendered="#{not _notification.hasRead}" />
						<h:outputText value="#{_notification.titile}" rendered="#{_notification.hasRead}" />						
					</p:column>	
					
					<p:column width="80">
						<f:facet name="header">状态</f:facet>
						#{_notification.hasRead ? '已读' : '未读'}
					</p:column>	
					
					<p:column width="140">
						<f:facet name="header">发送时间</f:facet>
						<h:outputText value="#{_notification.sendDate}">
							<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
						</h:outputText>
					</p:column>
	
					<p:column style="text-align: center" width="80">
						<f:facet name="header">操作</f:facet>
						<p:button outcome="NotificationView.xhtml" value="详情">
							<f:param name="notificationId" value="#{_notification.id}"></f:param>
						</p:button>
					</p:column>
				</p:dataTable>
				<!--页码开始-->
				<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
					<ui:param
						name="entityList"
						value="#{notificationList}"
					/>
				</ui:include>
				<!--页码结束-->
			</div>					
				
			<!--采购公告、中选公告结束-->
			
			<ui:remove>
				<p:panel id="searchResult">
					
				</p:panel>

				<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
					<ui:param
						name="entityList"
						value="#{notificationList}"
					/>
				</ui:include>
			</ui:remove>
		</h:form>

	</ui:define>
</ui:composition>
